Optimal. Leaf size=76 \[ \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2}+\frac {1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac {a b x}{c}+\frac {b^2 \log \left (c^2 x^2+1\right )}{2 c^2}-\frac {b^2 x \tan ^{-1}(c x)}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {4852, 4916, 4846, 260, 4884} \[ \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2}+\frac {1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac {a b x}{c}+\frac {b^2 \log \left (c^2 x^2+1\right )}{2 c^2}-\frac {b^2 x \tan ^{-1}(c x)}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 260
Rule 4846
Rule 4852
Rule 4884
Rule 4916
Rubi steps
\begin {align*} \int x \left (a+b \tan ^{-1}(c x)\right )^2 \, dx &=\frac {1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2-(b c) \int \frac {x^2 \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx\\ &=\frac {1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac {b \int \left (a+b \tan ^{-1}(c x)\right ) \, dx}{c}+\frac {b \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{c}\\ &=-\frac {a b x}{c}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2}+\frac {1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac {b^2 \int \tan ^{-1}(c x) \, dx}{c}\\ &=-\frac {a b x}{c}-\frac {b^2 x \tan ^{-1}(c x)}{c}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2}+\frac {1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2+b^2 \int \frac {x}{1+c^2 x^2} \, dx\\ &=-\frac {a b x}{c}-\frac {b^2 x \tan ^{-1}(c x)}{c}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2}+\frac {1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2+\frac {b^2 \log \left (1+c^2 x^2\right )}{2 c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 75, normalized size = 0.99 \[ \frac {2 b \tan ^{-1}(c x) \left (a c^2 x^2+a-b c x\right )+a c x (a c x-2 b)+b^2 \log \left (c^2 x^2+1\right )+b^2 \left (c^2 x^2+1\right ) \tan ^{-1}(c x)^2}{2 c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 83, normalized size = 1.09 \[ \frac {a^{2} c^{2} x^{2} - 2 \, a b c x + {\left (b^{2} c^{2} x^{2} + b^{2}\right )} \arctan \left (c x\right )^{2} + b^{2} \log \left (c^{2} x^{2} + 1\right ) + 2 \, {\left (a b c^{2} x^{2} - b^{2} c x + a b\right )} \arctan \left (c x\right )}{2 \, c^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 97, normalized size = 1.28 \[ \frac {a^{2} x^{2}}{2}+\frac {x^{2} b^{2} \arctan \left (c x \right )^{2}}{2}+\frac {b^{2} \arctan \left (c x \right )^{2}}{2 c^{2}}-\frac {b^{2} x \arctan \left (c x \right )}{c}+\frac {b^{2} \ln \left (c^{2} x^{2}+1\right )}{2 c^{2}}+a b \,x^{2} \arctan \left (c x \right )+\frac {a b \arctan \left (c x \right )}{c^{2}}-\frac {a b x}{c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.47, size = 104, normalized size = 1.37 \[ \frac {1}{2} \, b^{2} x^{2} \arctan \left (c x\right )^{2} + \frac {1}{2} \, a^{2} x^{2} + {\left (x^{2} \arctan \left (c x\right ) - c {\left (\frac {x}{c^{2}} - \frac {\arctan \left (c x\right )}{c^{3}}\right )}\right )} a b - \frac {1}{2} \, {\left (2 \, c {\left (\frac {x}{c^{2}} - \frac {\arctan \left (c x\right )}{c^{3}}\right )} \arctan \left (c x\right ) + \frac {\arctan \left (c x\right )^{2} - \log \left (c^{2} x^{2} + 1\right )}{c^{2}}\right )} b^{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.41, size = 88, normalized size = 1.16 \[ \frac {\frac {b^2\,{\mathrm {atan}\left (c\,x\right )}^2}{2}+\frac {b^2\,\ln \left (c^2\,x^2+1\right )}{2}-c\,\left (x\,\mathrm {atan}\left (c\,x\right )\,b^2+a\,x\,b\right )+a\,b\,\mathrm {atan}\left (c\,x\right )}{c^2}+\frac {a^2\,x^2}{2}+\frac {b^2\,x^2\,{\mathrm {atan}\left (c\,x\right )}^2}{2}+a\,b\,x^2\,\mathrm {atan}\left (c\,x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.73, size = 107, normalized size = 1.41 \[ \begin {cases} \frac {a^{2} x^{2}}{2} + a b x^{2} \operatorname {atan}{\left (c x \right )} - \frac {a b x}{c} + \frac {a b \operatorname {atan}{\left (c x \right )}}{c^{2}} + \frac {b^{2} x^{2} \operatorname {atan}^{2}{\left (c x \right )}}{2} - \frac {b^{2} x \operatorname {atan}{\left (c x \right )}}{c} + \frac {b^{2} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2 c^{2}} + \frac {b^{2} \operatorname {atan}^{2}{\left (c x \right )}}{2 c^{2}} & \text {for}\: c \neq 0 \\\frac {a^{2} x^{2}}{2} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________